package net.csdn.business.kanban.api.enums;

import com.alibaba.fastjson2.JSON;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @ClassName KanbanStatus
 * @Description TODO
 * @Author liuzhisheng
 * @Date 2023/9/14
 **/
@Getter
@AllArgsConstructor
public enum FieldStatusColorEnums {
    GRAY("Gray"),
    BLUE("Blue"),
    GREEN("Green"),
    YELLOW("Yellow"),
    ORANGE("Orange"),
    RED("Red"),
    PINK("Pink"),
    PURPLE("Purple");
    final String name;

    public static FieldStatusColorEnums ofCode(String name) {
        for (FieldStatusColorEnums type : FieldStatusColorEnums.values()) {
            if (type.name.equals(name)) {
                return type;
            }
        }
        throw new IllegalArgumentException("FieldStatusColorEnums param error");
    }
}
